<?php
if (class_exists('Memcached')) {
    return [
        'class' => 'yii\caching\MemCache',
        'useMemcached' => TRUE,
    ];
} elseif (class_exists('Memcache')) {
    return [
        'class' => 'yii\caching\MemCache',
        'useMemcached' => FALSE,
    ];
}
return [
    'class' => 'yii\caching\FileCache',
    'directoryLevel' => 0,
    'cachePath' => '@runtime/cache',
];
